import React, { useState } from 'react';
import {Button, Descriptions, Form} from 'antd';
import {connect} from "dva";
// import { connect } from 'dva';
// import request from '@/utils/request';

function Operpage(props) {
  return (
    <>
      <Descriptions column={2}>
        <Descriptions.Item label="流程实例标识">{props.passData.flowInstId}</Descriptions.Item>
        <Descriptions.Item label="系统来源">{props.passData.sourceFromName}</Descriptions.Item>
        <Descriptions.Item label="异常编码">{props.passData.exceptionCode}</Descriptions.Item>
        <Descriptions.Item label="异常名称">{props.passData.exceptionModelName}</Descriptions.Item>
        <Descriptions.Item label="异常分类">{props.passData.exceptionTypeName}</Descriptions.Item>
        <Descriptions.Item label="异常处理状态">{props.passData.exceptionStatusName}</Descriptions.Item>
        <Descriptions.Item label="解决方案类型">{props.passData.solveTypeName}</Descriptions.Item>
        <Descriptions.Item label="解决方案">{props.passData.planName}</Descriptions.Item>
        <Descriptions.Item label="异常单创建时间">{props.passData.createDateStr}</Descriptions.Item>
        <Descriptions.Item></Descriptions.Item>
        <Descriptions.Item label="异常关键字" span={2}>{props.passData.exceptionKey}</Descriptions.Item>
        <Descriptions.Item label="异常原因" span={2}>
          {props.passData.exceptionReason}
        </Descriptions.Item>
        <Descriptions.Item label="异常提示语" span={2}>
          {props.passData.exceptionTips}
        </Descriptions.Item>
      </Descriptions>
      <div
        style={{
          position: 'absolute',
          right: 0,
          bottom: 0,
          width: '100%',
          borderTop: '1px solid #e9e9e9',
          padding: '10px 16px',
          background: '#fff',
          textAlign: 'right',
        }}
      >
        <Button type="ghost" onClick={props.close}>
          返回
        </Button>
      </div>
    </>
  );
}

export default connect(({ abnormalOrder }) => ({
  passData:abnormalOrder.passData
}))((Operpage));
